package engine.asset
{
	import engine.core.*;
	import engine.loaders.*;
	import flash.media.*;
	
	public class RxAssetSound extends RxAsset
	{
		private var m_sound:Sound;
		private static var s_type:int;
		
		public function RxAssetSound()
		{
			super(s_type);
		}
		
		public static function Initialize() : void
		{
			s_type = RxAsset.RegisterType("sound", CreateFromXML);
		}
		
		public static function CreateFromXML(param1:XML, param2:String) : RxAssetSound
		{
			var _loc_3:* = param1.@name;
			var _loc_4:* = param1.@url;
			_loc_4 = RxUtilities.MergePath(param2, _loc_4);
			return Create(_loc_4, _loc_3);
		}
		
		public static function Create(param1:String, param2:String) : RxAssetSound
		{
			var _loc_3:* = GetByURL(param1);
			if (_loc_3 != null)
			{
				var _loc_4:* = _loc_3;
				var _loc_5:* = _loc_3.m_references + 1;
				_loc_4.m_references = _loc_5;
				return _loc_3;
			}
			_loc_3 = new RxAssetSound;
			_loc_3.SetURL(param1);
			_loc_3.SetName(param2);
			return _loc_3;
		}
		
		public static function GetByURL(param1:String) : RxAssetSound
		{
			return RxAssetSound(_getByURL(param1, s_type));
		}
		
		public function GetSound() : Sound
		{
			return this.m_sound;
		}
	}
}